<%-- 
    Document   : quanlydonhang
    Created on : 29-10-2011, 13:44:38
    Author     : VuTienIT
--%>
<%@page import="java.util.ArrayList" %>
<%@page import="model.pojo.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<div id="content_middle">
    <h3>Quản lý đơn đặt hàng</h3>
    <div class="detail_box">
        <div class="sidebar_box_content">
            <div id="login_box">

                <table width="100%" border="1">
                  <tr>
                    <td width="15%"><h4>Mã ĐH</h4></td>
                    <td><h4>Ngày đặt</h4></td>
                    <td><h4>Tổng tiền</h4></td>
                    <td><h4>Tình trạng</h4></td>
                    <td><h4>&nbsp;</h4></td>
                    <td><h4>&nbsp;</h4></td>
                  </tr>
                  <%
                    ArrayList<DonDatHangPOJO> dsHD = (ArrayList<DonDatHangPOJO>) request.getAttribute("DonDatHangS");
                    if(!dsHD.isEmpty()){
                    for(int i=0;i<dsHD.size();i++)
                    {
                        DonDatHangPOJO hd = new DonDatHangPOJO();
                        hd = dsHD.get(i);
                  %>
                  <tr align="center">
                    <td><%=hd.getMaDonDatHang()%></td>
                    <td><%=hd.getNgayDatHang()%></td>
                    <td><%=hd.getTongTien()%></td>
                    <td><%=hd.getTenTinhTrang()%></td>
                    <td><a href="ThongTinKH?Page=Detail&MaDonDatHang=<%=hd.getMaDonDatHang()%>">Xem chi tiết</a></td>
                    <td>
                    <% 
                        if (hd.getMaTinhTrang()!=2)
                        {
                        
                    %>
                    <a href="ThongTinKH?Page=History&Action=Huy&MaDonDatHang=<%=hd.getMaDonDatHang()%>">Hủy</a>
                    <%
                        }
                        else
                        {
                    %> 
                    <b>Hủy</b>
                    <%          
                        }
                    %>
                    </td>
                  </tr>
                  <% } %>
                  <% } %>
                </table>
                
            </div>
        </div>
        <p>&nbsp;</p>
    </div>

    <div class="cleaner"></div>
</div>